package com.runner.player;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.math.Vector2;
import com.runner.entity.CollisionEntity;
import com.runner.observer.Subject;
import com.runner.player.input.AprilInputComponent;
import com.runner.player.state.NormalState;
import com.runner.utility.Locator;

public class April extends Player {

	public static final float APRIL_JUMP_VEL = 160f * RELATIVE_SPEED;
	
	public April(Vector2 pos, Subject subject) {
		super(pos, TYPE.PLAYER, APRIL_PATH, SCALE, subject);
		input = new AprilInputComponent(this);
		state = new NormalState(this);
		
		jumpSprite=new Sprite(Locator.getAssets().get(APRIL_JUMP_PATH, Texture.class));
		slideSprite=new Sprite(Locator.getAssets().get(APRIL_SLIDE_PATH, Texture.class));
		runSprite=this.getSprite();
	}

	@Override
	public void collide(CollisionEntity otherBody) {
		super.collide(otherBody);
		state.collide(otherBody);
	}

	public Vector2 getJumpVelocity() {
		return new Vector2(0, APRIL_JUMP_VEL * Locator.getYGameSpeed());
	}

	public PLAYER_TYPE getPlayerType() {
		return PLAYER_TYPE.APRIL;
	}

	public float getJumpGravityScale() {
		return 1f;
	}

	public float getJumpTimer() {
		return 0.5f;
	}

}
